﻿using System;
using DevExpress.XtraGrid.Columns;

namespace Loki.UI.Win
{
    public struct GridRule<TDisplayClass> where TDisplayClass : class
    {
        public Func<TDisplayClass, bool> Validator { get; set; }

        public GridColumn Column { get; set; }
        public string ErrorMessage { get; set; }
        public Func<TDisplayClass, string> ErrorMessageBuilder { get; set; }
        public GridColumn[] Columns { get; set; }
    }

    public class ColumnRule<TDisplayClass> where TDisplayClass : class
    {
        public Func<TDisplayClass, bool> Validator { get; set; }
        public Func<TDisplayClass, string> ErrorMessageBuilder { get; set; }
    }
}
